pteval2 = lookup_domain_mpa(d, mpaddr, entry);
if (ps < PAGE_SHIFT)
- pteval2 |= address & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
+ pteval2 |= mpaddr & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
/* Check access rights. */
arflags = pteval & _PAGE_AR_MASK;
IA64FAULT vcpu_tak(VCPU * vcpu, u64 vadr, u64 * key)
{
- printk("vcpu_tak: tak instruction unsupported\n");
- return IA64_ILLOP_FAULT;
- // HACK ALERT: tak does a thash for now
- //return vcpu_thash(vcpu,vadr,key);
+ u64 pteval, itir, mask, iha;
+ IA64FAULT fault;
+
+ fault = vcpu_translate(vcpu, vadr, TRUE, &pteval, &itir, &iha);
+ if (fault == IA64_NO_FAULT || fault == IA64_USE_TLB)
+ *key = itir & IA64_ITIR_KEY_MASK;
+ else
+ *key = 1;
+
+ return IA64_NO_FAULT;
}
/**************************************************************************